<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
    <title>MydbQA - Analyze report</title>
    <link href="style/main.css" rel="stylesheet" type="text/css" />
    <link href="style/highlight/styles/default.css" rel="stylesheet" type="text/css" />
    <TMPL_UNLESS nohighlight>
        <script type="text/javascript" src="style/highlight/highlight.js"></script>
        <script type="text/javascript">initHighlightingOnLoad();</script>
    </TMPL_UNLESS>
</head>
<body>
    <div class="before quick_links">
        Quick links:&nbsp;&nbsp;
        <a href="#extract">Extracted queries</a>
        <a href="#ooe">Orders of execution</a>
        <a href="#indexes">Indexes analysis</a>
    </div>
    <br />
    <p class="before">
        Report from mydbqa version: <TMPL_VAR version><br/>
        Input params:
            <TMPL_LOOP input_args>
                <b><TMPL_VAR arg_name></b> = "<TMPL_VAR arg_value>";
            </TMPL_LOOP>
    </p><br />
    <div id="extract">
        <h1>Extracting queries</h1>
        <TMPL_LOOP extract>
            <div class="box mt10">
                <pre><code class="sql"><TMPL_VAR extract_q></code></pre>
                <div class="line">&nbsp;</div>
                <TMPL_IF extract_c_sql>
                    <p>SQL: <em><TMPL_VAR extract_c_sql></em></p>
                    <p>Result: <TMPL_VAR extract_c_res> rows</p>
                </TMPL_IF>
                <TMPL_IF extract_g_sql>
                    <p>SQL: <em><TMPL_VAR extract_g_sql></em></p>
                    <p>Min/Avg/Max: <TMPL_VAR extract_g_res> rows</p>
                </TMPL_IF>
            </div>
        </TMPL_LOOP>
    </div>
    <br />
    <!-- <div class="clear mt20">&nbsp;</div> -->
    <div id="ooe">
        <h1>Different orders of execution</h1>
        <TMPL_LOOP ooe>
            <div class="box mt10">
                <pre><code class="sql"><TMPL_VAR ooe_q></code></pre>
                <div class="line">&nbsp;</div>
                <p>Explain:</p>
                <table>
                    <tr class="<TMPL_IF ooe_q_most>green_header<TMPL_ELSE>header</TMPL_IF>">
                        <td>Id</td>
                        <td>Select type</td>
                        <td>Table</td>
                        <td>Type</td>
                        <td>Possible keys</td>
                        <td>Key</td>
                        <td>Key length</td>
                        <td>Ref</td>
                        <td>Rows</td>
                        <td>Extra</td>
                    </tr>
                    <TMPL_LOOP ooe_q_explain>
                    <tr>
                        <td><TMPL_VAR id></td>
                        <td><TMPL_VAR select_type></td>
                        <td><TMPL_VAR table></td>
                        <td><TMPL_VAR type></td>
                        <td><TMPL_VAR possible_keys></td>
                        <td><TMPL_VAR key></td>
                        <td><TMPL_VAR key_len></td>
                        <td><TMPL_VAR ref></td>
                        <td><TMPL_VAR rows></td>
                        <td><TMPL_VAR Extra></td>
                    </tr>
                    </TMPL_LOOP>
                </table>
                <p>Total rows: <b><TMPL_VAR ooe_q_totalrows></b></p>
            </div>
        </TMPL_LOOP>
    </div>
    <br/><br/>
</body>
</html>